package com.mobile.challenge.di.module;


import androidx.lifecycle.ViewModel;

import com.mobile.challenge.LoginViewModel;
import com.mobile.challenge.MainViewModel;
import com.mobile.challenge.app.likepoetry.LikePoetryViewModel;
import com.mobile.challenge.app.poetry.PoetryViewModel;
import com.mobile.challenge.app.poetrylite.PoetryLiteViewModel;
import com.mobile.challenge.ui.DashboardViewModel;
import com.mobile.challenge.ui.ResetPasswordViewModel;
import com.mobile.challenge.ui.home.HomeViewModel;
import com.mobile.challenge.ui.mine.MineViewModel;
import com.mobile.challenge.ui.report.ReportViewModel;
import com.mobile.challenge.ui.report.my.MyReportViewModel;
import com.mobile.challenge.ui.report.unit.admin.AdminUnitReportViewModel;
import com.mobile.challenge.ui.report.unit.admin.daily.AdminUnitDailyReportViewModel;
import com.mobile.challenge.ui.report.unit.admin.weekmonth.AdminHistogramViewModel;
import com.mobile.challenge.ui.report.unit.manager.ManagerUnitReportViewModel;
import com.mobile.challenge.ui.report.unit.manager.daily.ManagerUnitDailyReportViewModel;
import com.mobile.challenge.ui.report.unit.manager.weekmonth.ManagerLineViewModel;
import com.mobile.frame.mvvmframe.di.scope.ViewModelKey;

import dagger.Binds;
import dagger.Module;
import dagger.multibindings.IntoMap;

/**
 * ViewModel模块统一管理：通过{@link Binds}和{@link ViewModelKey}绑定关联对应的ViewModel
 *
 * @author <a href="mailto:jenly1314@gmail.com">Jenly</a>
 */
@Module
public abstract class ViewModelModule {

    @Binds
    @IntoMap
    @ViewModelKey(PoetryViewModel.class)
    abstract ViewModel bindPoetryViewModel(PoetryViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(PoetryLiteViewModel.class)
    abstract ViewModel bindPoetryLiteViewModel(PoetryLiteViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(LikePoetryViewModel.class)
    abstract ViewModel bindLikePoetryViewModel(LikePoetryViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(MainViewModel.class)
    abstract ViewModel bindMainViewModel(MainViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(LoginViewModel.class)
    abstract ViewModel bindLoginViewModel(LoginViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(DashboardViewModel.class)
    abstract ViewModel bindDashboardViewModel(DashboardViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(HomeViewModel.class)
    abstract ViewModel bindHomeViewModel(HomeViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(MineViewModel.class)
    abstract ViewModel bindMineViewModel(MineViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(ReportViewModel.class)
    abstract ViewModel bindReportViewModel(ReportViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(MyReportViewModel.class)
    abstract ViewModel bindMyReportViewModel(MyReportViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(AdminUnitReportViewModel.class)
    abstract ViewModel bindUnitReportViewModel(AdminUnitReportViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(AdminUnitDailyReportViewModel.class)
    abstract ViewModel bindUnitDailyReportViewModel(AdminUnitDailyReportViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(AdminHistogramViewModel.class)
    abstract ViewModel bindHistogramViewModel(AdminHistogramViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(ManagerUnitReportViewModel.class)
    abstract ViewModel bindManagerUnitReportViewModel(ManagerUnitReportViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(ManagerUnitDailyReportViewModel.class)
    abstract ViewModel bindManagerUnitDailyReportViewModel(ManagerUnitDailyReportViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(ManagerLineViewModel.class)
    abstract ViewModel bindManagerLineViewModel(ManagerLineViewModel viewModel);

    @Binds
    @IntoMap
    @ViewModelKey(ResetPasswordViewModel.class)
    abstract ViewModel bindResetPasswordViewModel(ResetPasswordViewModel viewModel);

}
